<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xml:lang="en" lang="en">
<h:head>
    <title><ui:insert name="title"></ui:insert> - #{applicationBean.siteHeader}</title>
    <meta http-equiv="keywords" content="#{applicationBean.keyWords}"/>
    <meta http-equiv="description"
          content="#{applicationBean.description}"/>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>

    <link rel="stylesheet" type="text/css"
          href="#{facesContext.externalContext.requestContextPath}/resources/rerebbs.css"/>
    <link rel="stylesheet" type="text/css"
          href="#{facesContext.externalContext.requestContextPath}/resources/rerebbs_a.css"/>
</h:head>
<h:body>
    <h:form id="myForm">
        <p:notificationBar position="top" widgetVar="bar11" autoDisplay="true" effect="slide" style="height: 15px;">
            <div style="margin: 0 auto;width:960px">
                <p:outputPanel autoUpdate="true">
                    <h:panelGroup rendered="#{!clientSession.ifLogin}" style="border:solid red 0px;">

                        <h:outputLink value="#{facesContext.externalContext.requestContextPath}/" styleClass="topNav"
                                      style="margin-left: 20px;">
                            <h:outputText value="首页"></h:outputText>
                        </h:outputLink>
                        <h:outputLink value="#{facesContext.externalContext.requestContextPath}/talk/ZoneList.jspx"
                                      styleClass="topNav" style="margin-left: 60px;">
                            <h:outputText value="讨论区"></h:outputText>
                        </h:outputLink>
                        <p:commandLink value="登录" styleClass="topNav" style="margin-left: 60px;" onclick="login1.show()"
                                       type="button"></p:commandLink>
                        <h:outputLink value="#{facesContext.externalContext.requestContextPath}/talk/Register.jspx"
                                      styleClass="topNav" style="margin-left: 60px;"
                                      rendered="#{!applicationBean.systemConfig.systemClosed}">
                            <h:outputText value="注册"></h:outputText>
                        </h:outputLink>
                    </h:panelGroup>

                    <h:panelGroup rendered="#{clientSession.ifLogin}" style="border:0px solid red;">
                        <h:outputLink value="#{facesContext.externalContext.requestContextPath}/" styleClass="topNav"
                                      style="margin-left: 20px;">
                            <h:outputText value="首页"></h:outputText>
                        </h:outputLink>
                        <h:outputLink value="#{facesContext.externalContext.requestContextPath}/talk/ZoneList.jspx"
                                      styleClass="topNav" style="margin-left: 60px;">
                            <h:outputText value="讨论区"></h:outputText>
                        </h:outputLink>
                        <h:outputLink
                                value="#{facesContext.externalContext.requestContextPath}/talk/UserCenter.jspx?id=#{clientSession.usr.id}"
                                styleClass="topNav" style="margin-left: 60px;">
                            <h:outputText value="#{clientSession.usr.username}"></h:outputText>
                        </h:outputLink>
                        <h:outputLink value="#{facesContext.externalContext.requestContextPath}/talk/ClientListMsg.jspx"
                                      styleClass="topNav" rendered="#{clientSession.usr.unReadedMsgNum==0}"
                                      style="margin-left: 60px;">
                            <h:outputText value="收件箱"></h:outputText>
                        </h:outputLink>
                        <h:outputLink value="#{facesContext.externalContext.requestContextPath}/talk/ClientListMsg.jspx"
                                      styleClass="topNav" rendered="#{clientSession.usr.unReadedMsgNum>0}"
                                      style="margin-left: 60px;">
                            <h:outputText value="收件箱（#{clientSession.usr.unReadedMsgNum}）"></h:outputText>
                        </h:outputLink>
                        <p:commandLink value="退出" ajax="false" action="#{clientSession.exit}" styleClass="topNav"
                                       update=":myForm:mainPanel" style="margin-left: 60px;"></p:commandLink>
                    </h:panelGroup>
                </p:outputPanel>
            </div>
        </p:notificationBar>

        <div style="width:960px;margin: 0px auto;">
            <div style="height: 38px;"/>
            <div style="border: green 0px solid; text-align: center;z-index: 1;margin-bottom:0px;padding-bottom: 0px;height:140px;overflow: hidden;">
                <h:graphicImage id="adv2"
                                style="width:957px;height:140px;margin: 0px 0px 0px 0px;border:1px solid gray;"
                                url="#{adv.advsMap[2].src}"/>

            </div>
            <p:panel id="mainPanel" style="width:957px;" styleClass="mainPanel">
                <ui:insert name="content"></ui:insert>
            </p:panel>
            <ui:include src="Footer.xhtml"/>
        </div>
        <ui:include src="/AjaxStatus2.xhtml"/>
        <ui:include src="LoginPopup.xhtml"></ui:include>
    </h:form>
</h:body>
</html>
